Optimal medication treatment